﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Global.Master" AutoEventWireup="true" CodeBehind="Cliente.aspx.cs" Inherits="WebAsbesto.Clientes_Agregar" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .auto-style2 {
            width: 100%;
        }
    </style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="auto-style2">
        <tr>
            <td colspan="2">
                <asp:Label ID="lbl_Titulo" runat="server" Text="Buscar Cliente"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lbl_Razon_Social" runat="server" Text="Razon_Social: "></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txt_Razon_Social" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lbl_CUIT" runat="server" Text="CUIT: "></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txt_CUIT" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:Button ID="btn_Buscar" runat="server" Text="Buscar Cliente" OnClick="btn_Buscar_Click" />
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:Label ID="lbl_Nuevo_Cliente" runat="server" Text="Ingresar Nuevo Cliente"></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:Button ID="btn_Ingresar_Nuevo_Cliente" runat="server" Text="Ingresar Nuevo Cliente" OnClick="btn_Ingresar_Nuevo_Cliente_Click" />
            </td>
        </tr>
    </table>

    <asp:GridView ID="Grd_Datos_Cliente" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="4" DataSourceID="SqlDataSource1" ForeColor="Black" GridLines="Horizontal" AllowSorting="True" DataKeyNames="Id_Cliente">
        <Columns>
            <asp:BoundField DataField="Id_Cliente" HeaderText="Id_Cliente" InsertVisible="False" ReadOnly="True" SortExpression="Id_Cliente" Visible="false" />
            <asp:BoundField DataField="Razon_Social" HeaderText="Razon_Social" SortExpression="Razon_Social" />
            <asp:BoundField DataField="Direccion_Cede_Central" HeaderText="Direccion_Cede_Central" SortExpression="Direccion_Cede_Central" />
            <asp:BoundField DataField="CUIT" HeaderText="CUIT" SortExpression="CUIT" />
            <asp:BoundField DataField="Rubro" HeaderText="Rubro" SortExpression="Rubro" />
            <asp:BoundField DataField="Nota" HeaderText="Nota" SortExpression="Nota" />
            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ButtonType="Image" CancelImageUrl="~/Images/cancelar.png" DeleteImageUrl="~/Images/Eliminar.gif" EditImageUrl="~/Images/editar.png" UpdateImageUrl="~/Images/Aceptar.png" />
        </Columns>
        <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
        <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
        <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#F7F7F7" />
        <SortedAscendingHeaderStyle BackColor="#4B4B4B" />
        <SortedDescendingCellStyle BackColor="#E5E5E5" />
        <SortedDescendingHeaderStyle BackColor="#242121" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:AsbestoConnectionString %>" DeleteCommand="Clientes_B" DeleteCommandType="StoredProcedure" InsertCommand="Clientes_A" InsertCommandType="StoredProcedure" SelectCommand="Clientes_L" SelectCommandType="StoredProcedure" UpdateCommand="Clientes_M" UpdateCommandType="StoredProcedure">
        <DeleteParameters>
            <asp:Parameter Name="Id_Cliente" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="Razon_Social" Type="String" />
            <asp:Parameter Name="Direccion_Cede_Central" Type="String" />
            <asp:Parameter Name="CUIT" Type="String" />
            <asp:Parameter Name="Rubro" Type="String" />
            <asp:Parameter Name="Nota" Type="String" />
        </InsertParameters>
        <SelectParameters>
            <asp:ControlParameter ControlID="txt_Razon_Social" Name="Razon_Social" PropertyName="Text" Type="String" DefaultValue=" " />
            <asp:ControlParameter ControlID="txt_CUIT" Name="CUIT" PropertyName="Text" Type="String" DefaultValue=" " />
        </SelectParameters>
        <UpdateParameters>
            <asp:Parameter Name="Id_Cliente" Type="Int32" />
            <asp:Parameter Name="Razon_Social" Type="String" />
            <asp:Parameter Name="Direccion_Cede_Central" Type="String" />
            <asp:Parameter Name="CUIT" Type="String" />
            <asp:Parameter Name="Rubro" Type="String" />
            <asp:Parameter Name="Nota" Type="String" />
        </UpdateParameters>
    </asp:SqlDataSource>

    <br />

</asp:Content>
